package com.wyh.domain.vo.groupOne.threemeterTree;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Api("用于生成树的建筑单元VO")
@TableName("buildingunits")
public class MasterDataBuildingUnitsVO {
    @ApiModelProperty("主键")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("上级id")
    @NotNull(message = "建筑单元上级id不能为空")
    @TableField("parentid")
    private Integer parentId;

    @ApiModelProperty("建筑单元名称")
    @NotBlank(message = "建筑单元名称不能为空或者空字符串")
    @Size(max = 255,message = "建筑单元名字不能超过255")
    private String name;

    @ApiModelProperty("0组团，1楼栋，2单元")
    @NotNull(message = "建筑单元类型不能为空")
    private Integer type;

    @ApiModelProperty("关联资源情况，Y是关联到组织表，N是关联到本表")
    @NotBlank(message = "是否链接到外表还是本表")
    @TableField("isconnected")
    private String isConnected;

    @ApiModelProperty("资源状态")
    private String formats;

    @ApiModelProperty("是否启用，1启用，0停用")
    @NotNull(message = "状态不能为空")
    @TableField("state")
    private Integer state;
}
